import { useVuexState } from '@/store'

export default function usePermissions(pageName: string, handleName: string) {
  const store = useVuexState()
  const permissions = store.state.login.permissions
  const varifyPermission = `system:${pageName}:${handleName}`

  return !!permissions.find((item: any) => item === varifyPermission)
}
